<?php $this->import('Header') ?>
	<div class="row-fluid">
		<div style="height: 10px;"></div>
		<div class="well">
			<div class="tab-content">
				<table class="table">
					<tr>
						<td>姓名</td>
						<td>Email</td>
						<td>主题</td>
						<td>内容</td>
						<td>时间</td>
					</tr>
					<?php foreach ($message as $arr) { ?>
					<tr>
						<td><?php echo $arr['Name'] ?></td>
						<td><?php echo $arr['Email'] ?></td>
						<td><?php echo $arr['Subject'] ?></td>
						<td title="<?php echo $arr['Content'] ?>"><?php echo \Lib\Util\Comm::truncate($arr['Content'], 200) ?></td>
						<td><?php echo date('Y-m-d H:i:s', $arr['CreateTime']) ?></td>
					</tr>
					<?php } ?>
				</table>
				<?php \Controller\UC\Pager::instance()->run(array('pager' => $pager)) ?>
			</div>
		</div>
	</div>
<?php $this->import('Footer') ?>
<script>
function del(id) {
	if (confirm('确定要删除这篇作品吗？')) {
		$.ajax({
			url: '/Ajax/Work/Del',
			data: {id:id},
			dataType: 'json',
			success: function(data) {
				if (data.error) {
					alert(data.data);
				} else {
					window.location.reload();
				}
			}
		});
	}
}
</script>